home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 February
/
Macworld (1999-02).dmg
/
Games World
/
SharewareGames
/
Xconq 7.2.2
/
lib
/
cave.g
< prev
next >
Wrap
Text File
|
1998-05-22
|
5KB
|
255 lines
(game-module "cave"
(title "Cave")
(blurb "Explore the Cave of Wandering Death")
)
(terrain-type floor (char "."))
(terrain-type passage (image-name "flagstone") (char "."))
(terrain-type rock (char "#"))
(add rock thickness 10)
(unit-type human (image-name "adventurer") (char "@")
(hp-max 10) (acp-per-turn 4))
(unit-type orc
(hp-max 10) (acp-per-turn 4) (cp 4))
(unit-type elf
(hp-max 10) (acp-per-turn 4) (cp 12))
(unit-type dwarf
(hp-max 10) (acp-per-turn 4) (cp 16))
(unit-type giant-ant (image-name "ant")
(hp-max 15) (acp-per-turn 4) (cp 4))
(unit-type giant-beetle (image-name "beetle")
(hp-max 20) (acp-per-turn 4) (cp 8))
(unit-type giant-spider (image-name "spider")
(hp-max 25) (acp-per-turn 4) (cp 12))
(unit-type white-dragon (image-name "dragon")
(hp-max 40) (acp-per-turn 4))
(unit-type red-dragon (image-name "red-dragon")
(hp-max 50) (acp-per-turn 4))
(unit-type imp (image-name "person")
(hp-max 5) (acp-per-turn 4) (cp 4))
(unit-type pit-demon
(hp-max 50) (acp-per-turn 4) (cp 40))
(unit-type sapphire (name "huge sapphire") (char "*"))
(unit-type emerald (name "huge emerald") (char "*"))
(unit-type ruby (name "huge ruby") (char "*"))
(unit-type diamond (name "huge diamond") (char "*"))
(unit-type nest
(hp-max 50) (acp-per-turn 1))
(unit-type orc-hole (image-name "ruins")
(hp-max 50) (acp-per-turn 1))
(unit-type pentagram (image-name "star-2")
(hp-max 100) (acp-per-turn 1))
(define humanoids (orc elf dwarf))
(define insects (giant-ant giant-beetle giant-spider))
(define dragons (white-dragon red-dragon))
(define reptiles (white-dragon red-dragon))
(define demons (imp pit-demon))
(define monsters (append humanoids insects reptiles demons))
(define animate (append human monsters))
(define items (sapphire emerald ruby diamond))
(define places (nest orc-hole pentagram))
(material-type food)
(material-type water)
(material-type gold)
;;; Static relationships.
(include "ng-weird")
(add human namer "generic-names")
(add human possible-sides "human")
(add monsters possible-sides "monster")
(add places possible-sides "monster")
(table unit-storage-x
(human m* (200 50 0))
)
(add human capacity 100)
(add humanoids capacity 100)
(add dragons capacity 200)
(add places capacity 8)
(table unit-size-as-occupant
(u* u* 999)
(items u* 1)
(insects nest 1)
(humanoids orc-hole 1)
(demons pentagram 1)
)
(add t* capacity (16 4 0))
(table unit-size-in-terrain
(animate t* 4)
(items t* 0)
)
;;; Vision.
;; (should make longer only around light sources or some such)
(add u* vision-range 5)
;; Humans are not cave dwellers by nature, don't see as well.
(add human vision-range 4)
(add items vision-range -1)
(add u* vision-bend 0)
(table eye-height
(u* t* 5)
)
;;; Actions.
(add items acp-per-turn 0)
;;; Movement.
(add places speed 0)
(table mp-to-enter-terrain
(u* rock 99)
)
(table mp-to-enter-own
(u* items 0)
)
;;; Construction.
(table acp-to-create
(nest insects 1)
(orc-hole humanoids 1)
(pentagram demons 1)
)
(table acp-to-build
(nest insects 1)
(orc-hole humanoids 1)
(pentagram demons 1)
)
;;; Combat.
(table hit-chance
(u* u* 50)
(items u* 0)
(places u* 0)
)
(table damage
(u* u* 1d6)
(u* items 0)
(items u* 0)
(places u* 0)
)
(table acp-to-capture
(u* items 1)
)
(table capture-chance
(u* items 100)
)
(table independent-capture-chance
(u* items 100)
)
;; Dwarves can dig.
(table acp-to-add-terrain
(dwarf (floor passage) 1)
)
(table acp-to-remove-terrain
(dwarf rock 1)
)
;;; Backdrop activities.
(add u* hp-recovery 100)
(set action-notices '(
((destroy u* items) (actor " smash " actee "!"))
((destroy u* orc-hole) (actor " plug " actee "!"))
((destroy u* pentagram) (actor " erase " actee "!"))
))
;;; Random setup.
(add floor maze-room-occurrence 1)
(add passage maze-passage-occurrence 1)
(add t* occurrence 0)
(add rock occurrence 1)
(set edge-terrain rock)
(set maze-passage-density 5000)
;;; One adventurer on a side.
(add human start-with 1)
(add places start-with 1)
(add dragons start-with 1)
(set country-radius-min 5)
(set country-separation-min 20)
(set country-separation-max 30)
(table independent-density
(items floor 500)
)
(table favored-terrain
(u* floor 100)
(u* rock 0)
)
(set synthesis-methods
'(make-maze-terrain make-countries make-independent-units))
(set sides-min 2)
(side 1 (name "You") (class "human") (emblem-name "none")
(self-unit 1))
(side 2 (noun "Monster") (class "monster") (emblem-name "none"))
(scorekeeper (do last-side-wins))
(game-module (notes (
"Cave exploration, with monsters."
)))
(game-module (design-notes (
"This is a pretty basic game. It could be much elaborated."
)))